Download React Native artifacts from the proxy cache server first#57325
Download React Native artifacts from the proxy cache server first#57325coado wants to merge 7 commits into
Conversation
cortinico
left a comment
There was a problem hiding this comment.
Great stuff 👍 love the direction
| "commander": "^12.0.0", | ||
| "flow-enums-runtime": "^0.0.6", | ||
| "hermes-compiler": "0.0.0", | ||
| "hermes-compiler": "250829098.0.14", |
| repo.content { it.excludeGroup("org.webkit") } | ||
| } | ||
| } | ||
| if (!hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) { |
There was a problem hiding this comment.
I think we probably want to add a kill-switch that disables this entirely, like a react.internal.enableReactNativeRepoMirror=false gradle property (naming up for debate).
We would need the same for iOS
There was a problem hiding this comment.
I think that RepoMirror is a bit vague here. How about changing it to reactNativeMavenCacheEnabled?
|
|
||
| class ReactNativeCoreUtils | ||
| MAVEN_CENTRAL_REPOSITORY = "https://repo1.maven.org/maven2" | ||
| REACT_NATIVE_MAVEN_CACHE_REPOSITORY = "https://rnmaven.swmtest.xyz" |
There was a problem hiding this comment.
This returns 404. Can we have a landing page? :)
There was a problem hiding this comment.
this is also really nit 💅
There was a problem hiding this comment.
Yeah, anything specific that we want to have there? We added artifacts explorer like on repo1.maven.org.
| } | ||
| } | ||
| if (!hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) { | ||
| mavenRepoFromUrl(REACT_NATIVE_MAVEN_CACHE_URL) { repo -> |
There was a problem hiding this comment.
Let's add a comment mentioning that this is added "first" intentionally
Summary:
This PR adds pull-through cache support for React Native Maven artifacts by trying
https://rnmaven.swmtest.xyz/before Maven Central for release artifacts.mavenCentral()scoped to React Native groups viaincludeGroupByRegex.https://repo1.maven.org/maven2.ENTERPRISE_REPOSITORYbehavior as an explicit single custom repository override.Changelog:
[GENERAL][CHANGED] - Add React Native Maven pull-through cache fallback for prebuilt artifacts.
Test Plan:
Run:
The logs confirm that React Native artifacts are cached and pulled from the proxy:
Added gradle plugin tests which can be run with: